#!/usr/bin/perl

require "./mailadmin-lib.pl";
&ReadParse();

my ($vols, $err_msg);

$vols = $in{'selvol'};

unless ($vols)
{
    $err_msg = $text{'msg_err_vols_empty'};
    goto ERROR_OUT;
}

$err_msg = &qmail_dir_set($vols);
if ( $err_msg )
{
    goto ERROR_OUT;
}

&mail_conf_checkin();

&redirect("maildir_edit.cgi");
exit(0);

ERROR_OUT:;
my (@headp, @footp);
@headp = ($text{'error'}, "");
@footp = ("maildir_edit.cgi", $text{'back_maildir'});
&mail_error(\@headp, \@footp, $text{'err_title_load_maildir_conf'}, $err_msg);
